<template>
  <div class="box">
    <main>
      <router-view/>
    </main>
    <footer>
      <router-link to='/index/main' tag="p">
        <i class="el-icon-house"></i>
        <span>主页</span>
      </router-link>
      <div class="car">
        <h4>
        <i class="el-icon-shopping-bag-1"></i>
        <span>购物袋</span>
      </h4>
      </div>
      <router-link to='/index/mine' tag="p">
        <i class="el-icon-picture-outline-round"></i>
        <span>个人中心</span>
      </router-link>
    </footer>
  </div>
</template>

<script>
export default {

}
</script>

<style lang='scss'>
.box{
  width: 100%;
  height: 100%;
  // background: rgb(241, 240, 240);
  display: flex;
  flex-direction: column;
}
main{
  flex: 1;
  background: white;
  overflow: hidden;
  overflow-y: scroll;
}
footer{
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  p{
    display: flex;
    flex-direction: column;
    text-align: center;
    i{
      font-size: 26px;
      margin-bottom: 5px;
    }
    span{
      font-size: 12px;
    }
    &.router-link-active{
      color: red;
    }
  }
  .car{
    width: 80px;
    height: 80px;
    border-radius: 50%;
    
    background: rgb(241, 240, 240);
    position: relative;
    bottom: 10px;
  }
  h4{
    display: flex;
    flex-direction: column;
    text-align: center;
    position: absolute;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    left: 50%;
    top:50%;
    margin-left: -30px;
    margin-top: -30px;
    i{
      font-size: 26px;
      margin-bottom: 5px;
      margin-top: 5px;
    }
    span{
      font-size: 12px;
    }
  }
}
</style>